package io.ouka.pub.exception;


import io.ouka.pub.exceptionenum.IResponseEnum;
import lombok.Getter;
import lombok.ToString;

/**
 * @author ouka
 * @ClassName BaseException
 * @Package com.sinosig.pub.exception
 * @Description: TODO
 * @date 2020/5/28 17:06
 */
@Getter
@ToString
public class BaseException extends RuntimeException{
    protected IResponseEnum iResponseEnum;
    protected Object[] args;

    public BaseException(IResponseEnum iResponseEnum) {
        super(iResponseEnum.getMsg());
        this.iResponseEnum = iResponseEnum;
    }

    public BaseException(IResponseEnum responseEnum, Object[] args, String message) {
        super(message);
        this.iResponseEnum = responseEnum;
        this.args = args;
    }

    public BaseException(IResponseEnum responseEnum, Object[] args, String message, Throwable cause) {
        super(message, cause);
        this.iResponseEnum = responseEnum;
        this.args = args;
    }
}
